package com.hangjiang.gulidear.model;

import java.sql.Timestamp;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.GeneratedValue;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.Table;
import org.hibernate.annotations.GenericGenerator;

/**
 * Bugsolution entity. @author MyEclipse Persistence Tools
 */
@Entity
@Table(name = "bugsolution", catalog = "sqm")
public class BugSolution extends BaseEntity {

	// Fields

	private String solutionId;
	private Task task;
	private String solutionTitle;
	private String solutionDescribe;
	private Timestamp submitTime;
	private String sattachPath;

	// Constructors

	/** default constructor */
	public BugSolution() {
	}

	/** full constructor */
	public BugSolution(Task task, String solutionTitle,
			String solutionDescribe, Timestamp submitTime, String sattachPath) {
		this.task = task;
		this.solutionTitle = solutionTitle;
		this.solutionDescribe = solutionDescribe;
		this.submitTime = submitTime;
		this.sattachPath = sattachPath;
	}

	// Property accessors
	@GenericGenerator(name = "generator", strategy = "uuid.hex")
	@Id
	@GeneratedValue(generator = "generator")
	@Column(name = "solutionId", unique = true, nullable = false, length = 32)
	public String getSolutionId() {
		return this.solutionId;
	}

	public void setSolutionId(String solutionId) {
		this.solutionId = solutionId;
	}

	@ManyToOne(fetch = FetchType.LAZY)
	@JoinColumn(name = "taskId")
	public Task getTask() {
		return this.task;
	}

	public void setTask(Task task) {
		this.task = task;
	}

	@Column(name = "solutionTitle", length = 30)
	public String getSolutionTitle() {
		return this.solutionTitle;
	}

	public void setSolutionTitle(String solutionTitle) {
		this.solutionTitle = solutionTitle;
	}

	@Column(name = "solutionDescribe", length = 200)
	public String getSolutionDescribe() {
		return this.solutionDescribe;
	}

	public void setSolutionDescribe(String solutionDescribe) {
		this.solutionDescribe = solutionDescribe;
	}

	@Column(name = "submitTime", length = 0)
	public Timestamp getSubmitTime() {
		return this.submitTime;
	}

	public void setSubmitTime(Timestamp submitTime) {
		this.submitTime = submitTime;
	}

	@Column(name = "sAttachPath")
	public String getSattachPath() {
		return this.sattachPath;
	}

	public void setSattachPath(String sattachPath) {
		this.sattachPath = sattachPath;
	}

}